Release 10.1A: OpenEdge Development:
Progress 4GL Handbook
Using the Intelligent Edit Control and its shortcuts
The first step in the next part of your sample procedure involves defining another program variable. You won’t do too many of these before you might begin to get tired of typing the words
DEFINE VARIABLEandNO-UNDOand so forth over and over again. In fact, you don’t have to do all that typing at all.You’ve already seen that when you use the Progress Procedure Editor to edit your Progress 4GL code, you are using an intelligent syntax editor that can perform many tasks for you. One of these is syntax completion. Using this feature can save you many keystrokes in your programming, helps to prevent typographical errors, and helps to impose a standard form to your code.
![]()
To define a new
INTEGERvariable for your procedure:
- Position the cursor to the beginning of the line where you want the definition to go, following the variable definition you have already, then enter the letters DVI, or DVIN, which stand for Define Variable INteger.
- Press the SPACE BAR. The following code appears:
![]()
The text
DEFINE VARIABLE AS INTEGER NO-UNDOis inserted for you, and the cursor is placed right where you need it so you can enter the variable name.- Type iDays as the variable name. You’ll use this variable later.
Here are the abbreviations for other data types that you’ve learned:
![]()
To see all the abbreviations (also called aliases) and other editing options available to you, select Options
Editing Options from the Procedure Editor menu. The Editing Options dialog box appears:
![]()
Among other things, this dialog box specifies the following default settings:
- The syntax expansion that turns DVI into
DEFINE VARIABLEAS INTEGERNO-UNDOis turned on (the Syntax expansion toggle box).- Lines of your program are indented based on the Editor’s understanding of the statements you’re entering (the Indent style selection).
- Tabs are set to 4-character intervals (the Tabs fill-in field).
![]()
To see a list of all the aliases (also called shortcuts) that are defined, click the Alias button. The Alias Editor dialog box appears:
![]()
In this dialog box you see all the aliases for the
DEFINE VARIABLEstatement, along with a number of other useful ones, including one that automatically respells the (apparently) common typographical errorDIPSLAYasDISPLAY. Aliases can be further abbreviated to any unique substring of the alias, which is why DVI works as well as DVIN. Note that you can also define new aliases of your own. They are stored in a file calledp4gl.als.
![]()
To peruse another set of options that you can customize, click OK to return to the main Editing Options dialog box, then click the Options button. The Progress 4GL Options dialog box appears:
![]()
This dialog box includes, among other options, the automatic uppercasing of keywords that you’ve seen in action. If this isn’t your preference, you can turn it off.
![]()
If you click the Help button on any of these dialog boxes, you can see detailed information on all the options available to you.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |